home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_059 / fixwb / poster < prev   
Text File  |  1992-05-06  |  4KB  |  94 lines

  1. Article 2650 of comp.sys.amiga:
  2. Path: mcdsun!noao!hao!oddjob!uwvax!seismo!ll-xn!ames!lll-lcc!well!ewhac
  3. From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab)
  4. Newsgroups: comp.sys.amiga
  5. Subject: So Close, Yet So Far Away...
  6. Message-ID: <2754@well.UUCP>
  7. Date: 11 Mar 87 10:14:52 GMT
  8. Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab)
  9. Distribution: world
  10. Organization: Whole Earth Lectroinic Link, Sausalito, CA
  11. Lines: 224
  12.  
  13. [ I've been released from the NSA mental health ward. ]
  14.  
  15. Hello again,
  16.  
  17.     I had hoped that I might be able to give you all an actual utility.
  18. As it turns out, I can't.
  19.  
  20.     Once upon a time, I saw a program for the Macintrash computer that
  21. loaded a picture into the Desktop's background, so that you would have a
  22. pretty picture to look at behind all your windows instead of just a boring
  23. pattern.
  24.  
  25.     I thought I'd try writing this for the Amiga.  It shouldn't be too
  26. hard, I thought.  Just change the WorkBench's backdrop window from
  27. SIMPLE_REFRESH to SMART_REFRESH, without mashing anything.
  28.  
  29.     Well, I got that far.  But after modifying the backdrop window, I
  30. discovered a "feature" of the WorkBench.
  31.  
  32.     The disk icons are attached to the WorkBench backdrop window
  33. (obviously), and are therefore rendered in its RastPort.  I had anticipated
  34. problems with this (disk icons might permanently mark a loaded image), but
  35. didn't know exactly how WorkBench dealt with it.
  36.  
  37.     I found out.  Whenever you move a disk icon, or remove a volume from
  38. a drive, the WorkBench program *clears the screen* and redraws all the disk
  39. icons.  Thus, if you render anything into the WorkBench window, it will get
  40. erased the moment you fiddle with the disk icons.
  41.  
  42.     This pretty much blew my idea out of the water.  I can see no way
  43. around this, apart from replacing the SetRast() call in the graphics library
  44. (to check for to see if they're trying to clear the WorkBench and prevent
  45. it), or by rewriting the WorkBench (no, thanks).
  46.  
  47.     I also tried setting the RastPort's Mask value to 0.  I thought this
  48. would prevent any subsequent rendering into the window.  It was here I
  49. encountered what appears to be at first sight a bug in the graphics library.
  50. After rendering into the window, I set the Mask to 0.  Everything appeared
  51. to be fixed on the screen.  Then I moved my CLI window around.  Everything
  52. underneath it was erased.  "Hmmm," I thought.  "Could it be that, when
  53. returning backup bitmaps to the visible screen, it's wrongly observing the
  54. Mask value?"  As an experiment, I changed the mask value to 1 and tried
  55. moving the CLI window around again.  After uncovering something, anything
  56. that was in the masked bitplane disappeared.  I can only assume that the
  57. graphics library is trying to restore the visible bitmap while observing the
  58. Mask value, which strikes me as wrong.  Dale Luck, you out there?  Can you
  59. comment on this? (KS 1.2R, 512K CHIP, 2M FAST, 2 drives, MANX, written while
  60. listening to 1812 Overture (Guru alerts take on a whole new meaning :-) ))
  61.  
  62.     In any event, I did end up with some code that does, in fact, change
  63. the WorkBench window from SIMPLE_ to SMART_REFRESH.  I thought you people
  64. might find it instuctive.  And who knows; someone else may actually get my
  65. original idea working.
  66.  
  67.     The following program changes the identity of the WorkBench backdrop
  68. window, then draws a couple of lines in it to "prove" that it's really SMART
  69. now.  You can move windows around, and the background will be preserved.
  70. However, the moment you fiddle with the disk icons, the window will be
  71. cleared, and the only thing you'll have to show for all this is a major loss
  72. of chip RAM.
  73.  
  74.     By the way, this is a MANX program.
  75.     cc fixwb.c
  76.     ln fixwb.o -lc -o fixwb
  77.  
  78.     Maybe you people can do something constructive with this.  Thanks
  79. for your time and disk space.
  80.  
  81. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  82.  ________         ___            Leo L. Schwab
  83.        \        /___--__        The Guy in The Cape
  84.   ___  ___ /\            ---##\        ihnp4!ptsfa!well!ewhac
  85.       /   X  \_____    |  __ _---))            ..or..
  86.      /   /_\--    -----+==____\ // \  _        well ---\
  87. ___ (   o---+------------------O/   \/ \    dual ----> !unicom!ewhac
  88.      \     /            ___ \_  (`o )    hplabs -/       ("AE-wack")
  89.  ____ \___/                 \_/
  90.           Recumbent Bikes:            "Work FOR?  I don't work FOR
  91.         The _O_n_l_y Way To Fly!        anybody!  I'm just having fun."
  92.  
  93. _-_-_-_-_-_-_-_-_-_-_ Apply Andy Finkel here. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  94.